Skip to content

UC23: Fix signal best practice violations in dashboard#197

Open
Artur- wants to merge 4 commits intomainfrom
review7
Open

UC23: Fix signal best practice violations in dashboard#197
Artur- wants to merge 4 commits intomainfrom
review7

Conversation

@Artur-
Copy link
Copy Markdown
Member

@Artur- Artur- commented Mar 27, 2026

  • Use ListSignal.getValues() instead of manual get().stream().map(get())
  • Wrap signal modification in effect with runWithoutTransaction() to make the intentional mutation explicit (tracking previous values)
  • Use Signal.computed() for multi-signal text binding instead of map() with get() on another signal

Artur- added 3 commits March 27, 2026 18:58
- Use ListSignal.getValues() instead of manual get().stream().map(get())
- Wrap signal modification in effect with runWithoutTransaction() to
  make the intentional mutation explicit (tracking previous values)
- Use Signal.computed() for multi-signal text binding instead of map()
  with get() on another signal
Test that onDataUpdate propagates values to highlight card spans and
that the percentage change badge computes correctly after two data
updates (exercises the runWithoutTransaction and Signal.computed changes).
Made onDataUpdate package-private to enable direct testing.
Comment thread src/test/java/com/example/usecase23/UseCase23ViewTest.java Outdated
Copy link
Copy Markdown
Contributor

@mshabarov mshabarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I don't fully get why

Uses runWithoutTransaction since we must track previous state

is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants